package Homework7;

public class Residence extends HouseProperty {
    public Residence(double area, double unitPrice) {
        super(area, unitPrice);
    }

    @Override
    public double taxCalculation() {
        double totalPrice = getTotalPrice();
        if (area <= 90) {
            return totalPrice * 0.015;
        } else {
            return totalPrice * 0.02;
        }
    }
}
